
public class Predator {
private int x;
private int y;
private int age;
private int deathage;
private int fertile;
private int lifeforce;

public Predator(){
	x=2;
	y=2;
	age=4;
	deathage=10;
	fertile=3;
	lifeforce=100;
}
public Predator(int x, int y, int age ,int deathage, int fertile, int lifeforce){
	this.x = x;
	this.y = y;
	this.age = age;
	this.deathage = deathage;
	this.fertile = fertile;
	this.lifeforce = lifeforce;
	
}
public void move(){
	int rnd = (int) ((Math.random() * 4) + 1);
	if (rnd == 1){
		x++;
	}else if(rnd == 2){
		x--;
	}else if(rnd == 3){
		y++;
	}else if(rnd == 4){
		y--;
	}
	age++;
	lifeforce--;
}

public int getX() {
	return x;
	
}
public void setX(int x) {
	this.x = x;
	
}
public int getY() {
	return y;
	
}
public void setY(int y) {
	this.y = y;
	
}
public int getAge() {
	return age;
	
}
public void setAge(int age) {
	this.age = age;
	
}
public int getDeathage() {
	return deathage;
	
}
public void setDeathage(int deathage) {
	this.deathage = deathage;
	
}
public int getFertile() {
	return fertile;
	
}
public void setFertile(int fertile) {
	this.fertile = fertile;
	
}
public int getLifeforce() {
	return lifeforce;
	
}
public void setLifeforce(int lifeforce) {
	this.lifeforce = lifeforce;
}

}
